package com.cn.design.openshut;

/**
 * @author Chenhaowen
 * @since 2019/8/7 17:08.
 */
public class AProduct implements Product {

    /**
     * 商品名称
     */
    private String name;

    /**
     * 商品价格
     */
    private Double price;

    /**
     * 商品类型
     */
    private Integer type;



    public AProduct(String name, Double price, Integer type){
        super();
        this.name = name;
        this.price = price;
        this.type = type;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public Double getPrice() {
        return price;
    }

    @Override
    public Integer getType() {
        return type;
    }


    public static void main(String[] args) {
        AProduct aProduct = new AProduct("电脑",15999.0,1);
        System.out.println("商品名称:"+aProduct.getName()+"\n"
                +"商品价格："+aProduct.getPrice()+"\n"
                +"商品分类："+aProduct.getType());
    }
}
